package com.gxa.feedback.controller;


import com.gxa.common.R;
import com.gxa.common.entity.platform_maintenance_service1001.Feedback;
import com.gxa.feedback.service.FeedBackService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.Date;

@RestController
@RequestMapping("/feedBack")
public class FeedBackController {


    @Autowired
    private FeedBackService feedBackService;

    /**
     * 1.意见反馈按照分页查询
     * @param currentPage
     * @param pageSize
     * @return
     */
    @GetMapping("/selectFeedBackByPage")
    public R selectFeedBackByPage(Integer currentPage,Integer pageSize){

        return feedBackService.selectFeedBackByPage(currentPage,pageSize);
    }

    /**
     * 2.按照条件查询

     * @return
     */
    @PostMapping("/selectFeedBackByCondition")
    public R selectFeedBackByCondition(@RequestBody Feedback feedback){
        return feedBackService.selectFeedBackByCondition(feedback);
    }

    /**
     * 3.按照状态来修改信息
     * @param feedback
     * @return
     */
    @PostMapping("/updateFeedBackByStatus")
    public R updateFeedBackByStatus(@RequestBody Feedback feedback){
        return feedBackService.updateFeedBackByStatus(feedback);
    }


}
